NAND flash memory, as well as other types of non-volatile memories (“NVMs”), are commonly used for mass storage. For example, consumer electronics such as portable media players often include flash memory to store music, videos, and other media.
NVMs, however, may develop defective memory cells through everyday use, and operational memory cells may suffer from program disturbs due to voltages applied to neighboring cells. Thus, in order to correct for data errors caused by program disturbs, a system may apply an error correcting code to user data (e.g., data stored by an application) that will be stored in the NVM in order to generate “parity data”. The resulting parity data can then be stored along with the user data in the NVM. Upon detection of an error in the user data, the system can attempt to use the parity data to correct for the error.